home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / ifp1s155.zip / PAGE_18.PAS < prev    next >
Pascal/Delphi Source File  |  1992-04-21  |  35KB  |  1,449 lines

  1. unit page_18;
  2.  
  3. interface
  4.  
  5. uses crt, dos, ifpextrn, ifpglobl, ifpcomon;
  6.  
  7. procedure page18;
  8.  
  9. implementation
  10.  
  11. const
  12.   winclass: array[0..6] of string[21] = ('vector plotter', 'raster display',
  13.               'raster printer', 'raster camera', 'character-stream, PLP',
  14.               'Metafile, VDM', 'display-file');
  15.   pcAstatus: array[$FFFC..$FFFF] of string[23] = ('resident and active',
  16.                'resident and not active', 'memory resident mode',
  17.                'automatic mode');
  18.   pcAspd: array[0..$F] of word = (50, 75, 110, 134, 150, 300, 600, 1200, 1800,
  19.             2000, 2400, 4800, 7200, 9600, 19200, 38400);
  20.  
  21.  
  22. procedure page18;
  23.  
  24. type
  25.   smartdrvt = record
  26.                write_through: byte;
  27.                write_buffered: byte;
  28.                cache_enabled: byte;
  29.                drivertype: byte;
  30.                cticks: word;
  31.                locked: byte;
  32.                reboot_flush: byte;
  33.                full_track_write: byte;
  34.                buffering_type: byte;
  35.                origInt13ofs: word;
  36.                origInt13seg: word;
  37.                minorversion: byte;
  38.                majorversion: byte;
  39.                reserved: word;
  40.                secs_read: word;
  41.                secs_in_cache: word;
  42.                secs_in_trk_buf: word;
  43.                cache_hitrate: byte;
  44.                track_buf_hitrate: byte;
  45.                total_tracks: word;
  46.                tracks_used: word;
  47.                locked_tracks: word;
  48.                dirty_tracks: word;
  49.                current_size: word;
  50.                original_size: word;
  51.                minimum_size: word;
  52.                lock_pointer_ofs: word;
  53.                lock_pointer_seg: word;
  54.              end;
  55.  
  56.   fossilbuft = record
  57.                  fbufsize: word;
  58.                  spec: byte;
  59.                  rev: byte;
  60.                  idstrofs: word;
  61.                  idstrseg: word;
  62.                  inbufsize: word;
  63.                  infree: word;
  64.                  outbufsize: word;
  65.                  outfree: word;
  66.                  scrwidth: byte;
  67.                  scrlen: byte;
  68.                  baudrate: byte;
  69.                  extra: array[1..13] of byte;
  70.                end;
  71.   vfossilbuft = record
  72.                   fbufsize: word;
  73.                   ver: word;
  74.                   rev: word;
  75.                   hifunc: word
  76.                 end;
  77.   stackerbuft = record
  78.                   signature: word;
  79.                   unknown: word;
  80.                   ddofs: word;
  81.                   ddseg: word
  82.                 end;
  83.   T386maxbuf = record
  84.                  version: byte;
  85.                  signature: array[1..6] of char;
  86.                  verstr: array[1..4] of char;
  87.                  lowseg: word;
  88.                  unkw1: word;
  89.                  unkw2: word;
  90.                  flags1: word;
  91.                  unk1: array [1..16] of byte;
  92.                  int15port: word;
  93.                  int67port: word;
  94.                  unkw3: word;
  95.                  unkw4: word;
  96.                  unkd1: longint;
  97.                  unkd2: longint;
  98.                  sysconfig: word;
  99.                  unk2: array [1..8] of byte;
  100.                  flags2: word;
  101.                  flags3: word;
  102.                  flags4: word;
  103.                  unkw5: word;
  104.                  extfree: word;
  105.                  unkd3: longint;
  106.                  unkw6: word;
  107.                  unkd4: longint;
  108.                  flags5: word;
  109.                  oldint21ofs: word;
  110.                  oldint21seg: word;
  111.                  emsofs: word;
  112.                  emsseg: word;
  113.                  extra: byte;
  114.                end;
  115.  
  116. var
  117.   i : 1..63;
  118.   xbool1 : boolean;
  119.   xbool2 : boolean;
  120.   xbool3 : boolean;
  121.   xchar : char;
  122.   xword1: word;
  123.   xword2: word;
  124.   regs: registers;
  125.   QEMMid: byte;
  126.   foundit: boolean;
  127.   xbyte, xbyte2: byte;
  128.   s: string;
  129.   fossilbuf: fossilbuft;
  130.   vfossilbuf: vfossilbuft;
  131.   smartdrvbuf: smartdrvt;
  132.   stackerbuf: stackerbuft;
  133.   xlong: longint;
  134.   V386maxbuf: T386maxbuf;
  135.  
  136. function windev(device: byte): word;
  137.   var
  138.     regs: registers;
  139.     saveit: word;
  140.  
  141.   begin
  142.   with regs do
  143.     begin
  144.     AX:=$1682;
  145.     Intr($2F, regs);
  146.     AX:=$170A;
  147.     DX:=device;
  148.     Intr($2F, regs);
  149.     windev:=AX
  150.     end
  151.   end; {windev}
  152.  
  153. procedure nortonstatus(b: byte);
  154.   begin
  155.   case b of
  156.     0: Write('disabled');
  157.     1: Write('enabled')
  158.   else
  159.     Write('unknown')
  160.   end
  161.   end; {nortonstatus}
  162.  
  163.   begin (* procedure page_18 *)
  164.   caption1('----Shells and Shell enhancers----');
  165.   Writeln;
  166.   caption2('JP Software 4DOS');
  167.   with regs do
  168.     begin
  169.     AX:=$D44D;
  170.     BX:=0;
  171.     CX:=0;
  172.     DX:=0;
  173.     Intr($2F, regs);
  174.     if AX <> $44DD then
  175.       Writeln('no')
  176.     else
  177.       begin
  178.       Writeln('yes');
  179.       caption3('version');
  180.       xword1:=BH;
  181.       Write(BL, decimal);
  182.       zeropad(xword1);
  183.       caption3('shell no.');
  184.       Write(DL);
  185.       caption3('PSP segment');
  186.       Writeln(hex(CX, 4))
  187.       end;
  188.     end;
  189.   pause3(-1);
  190.   if endit then
  191.     Exit;
  192.   caption2('JP Software KSTACK.COM');
  193.   with regs do
  194.     begin
  195.     AX:=$D44F;
  196.     BX:=0;
  197.     CX:=0;
  198.     DX:=0;
  199.     Intr($2F, regs);
  200.     yesorno(AX = $44DD);
  201.     end;
  202.   pause3(-2);
  203.   if endit then
  204.     Exit;
  205.   caption2('Norton NDOS');
  206.   with regs do
  207.     begin
  208.     AX:=$E44D;
  209.     BX:=0;
  210.     CX:=0;
  211.     DX:=0;
  212.     Intr($2F, regs);
  213.     if AX <> $44EE then
  214.       Writeln('no')
  215.     else
  216.       begin
  217.       Writeln('yes');
  218.       caption3('version');
  219.       xword1:=BH;
  220.       Write(BL, decimal);
  221.       zeropad(xword1);
  222.       caption3('shell no.');
  223.       Write(DL);
  224.       caption3('PSP segment');
  225.       Writeln(hex(CX, 4))
  226.       end;
  227.     end;
  228.   pause3(-1);
  229.   if endit then
  230.     Exit;
  231.   caption2('WildUnix');
  232.   with regs do
  233.     begin
  234.     AH:=$4E;
  235.     DS:=0;
  236.     DX:=0;
  237.     MsDos(regs);
  238.     yesorno(AH = $99);
  239.     end;
  240.   pause3(-1);
  241.   if endit then
  242.     Exit;
  243.   caption2('Anarkey');
  244.   with regs do
  245.     begin
  246.     AX:=$E300;
  247.     Intr($2F, regs);
  248.     case AL of
  249.       $00: Writeln('no');
  250.       $FE: Writeln('yes; but suspended');
  251.       $FF: Writeln('yes; and active');
  252.     else
  253.       Writeln('???')
  254.     end
  255.     end;
  256.   pause3(-1);
  257.   if endit then
  258.     Exit;
  259.   caption1('----DOS Extenders----');
  260.   Writeln;
  261.   caption2('DOS/16M');
  262.   with regs do
  263.     begin
  264.     AX:=$BF02;
  265.     DX:=0;
  266.     Intr($15, regs);
  267.     yesorno(DX <> 0);
  268.     end;
  269.   pause3(-4);
  270.   if endit then
  271.     Exit;
  272.   caption2('Phar Lap DOS Extender');
  273.   xbool1:=false;
  274.   xbyte:=1;
  275.   with regs do
  276.     repeat
  277.       AX:=$ED00;
  278.       BL:=xbyte;
  279.       Intr($2F, regs);
  280.       if (AL = $FF) and (SI = $5048 {PH}) and (DI = $4152 {AR}) then
  281.         begin
  282.         xbool1:=true;
  283.         Write('yes');
  284.         caption3('type');
  285.         case xbyte of
  286.           1: Write('286dosx v1.3+ SDK');
  287.           2: Write('286dosx v1.3+ RTK');
  288.           3: Write('386dosx v4.0+ SDK');
  289.           4: Write('386dosx v4.0+ RTK')
  290.         end;
  291.         caption3('version');
  292.         Write(CH, decimal);
  293.         zeropad(CL);
  294.         end;
  295.       Inc(xbyte);
  296.     until xbyte > 4;
  297.   if not xbool1 then
  298.     Writeln('no');
  299.   pause3(-4);
  300.   if endit then
  301.     Exit;
  302.   caption1('----Memory Managers and Memory utilities----');
  303.   Writeln;
  304.   caption2('QEMM');
  305.   with regs do
  306.     begin
  307.     QEMMid:=$D2;
  308.     foundit:=false;
  309.     repeat
  310.       AH:=QEMMId;
  311.       AL:=0;
  312.       BX:=$5144; {'QD'}
  313.       CX:=$4D45; {'ME'}
  314.       DX:=$4D30; {'M0'}
  315.       Intr($2F, regs);
  316.       if (AL = $FF) and (BX = $4D45) and (CX = $4D44) and (DX = $5652) then
  317.         foundit:=true
  318.       else
  319.         begin
  320.         if QEMMid < $FF then
  321.           Inc(QEMMid)
  322.         else
  323.           QEMMid:=$C0;
  324.         end;
  325.     until foundit or (QEMMid = $D2);
  326.     if not foundit then
  327.       Writeln('no')
  328.     else
  329.       begin
  330.       AH:=QEMMid;
  331.       AL:=1;
  332.       BX:=$5145; {'QE'}
  333.       CX:=$4D4D; {'MM'}
  334.       DX:=$3432; {'42'}
  335.       Intr($2F, regs);
  336.       if BX = $4F4B {'OK'} then
  337.         begin
  338.         Write('yes');
  339.         caption3('API entry');
  340.         segofs(ES, DI);
  341.         xlong:=longint(ES) shl 16 + DI;
  342.         caption3('version');
  343.         AH:=3;
  344.         longcall(xlong, regs);
  345.         if not nocarry(regs) then
  346.           Write('error')
  347.         else
  348.           Write(unBCD(BH), decimal, addzero(unBCD(BL)));
  349.         xword:=BX;
  350.         caption3('status');
  351.         AH:=0;
  352.         longcall(xlong, regs);
  353.         if not nocarry(regs) then
  354.           Write('error')
  355.         else
  356.           if AL and 1 = 1 then
  357.             Write('OFF')
  358.           else
  359.             if AL and 2 = 2 then
  360.                Write('Auto')
  361.             else
  362.               Write('ON');
  363.         Writeln;
  364.         caption3('High RAM');
  365.         AH:=$12;
  366.         longcall(xlong, regs);
  367.         if not nocarry(regs) then
  368.           Write('error')
  369.         else
  370.           begin
  371.           yesorno2(BX <> 0);
  372.           if BX <> 0 then
  373.             begin
  374.             caption3('first MCB at');
  375.             Write(hex(BX, 4));
  376.             end;
  377.           end;
  378.         if Hi(xword) >= 6 then
  379.           begin
  380.           caption3('Stealth');
  381.           AX:=$1E00;
  382.           longcall(xlong, regs);
  383.           if not nocarry(regs) then
  384.             Write('error')
  385.           else
  386.             begin
  387.             case CL of
  388.                 0: Write('OFF');
  389.               $46: Write('Frame');
  390.               $4D: Write('Map')
  391.             else
  392.               Write('????');
  393.             end;
  394.             if (CL = $46) or (CL = $4D) then
  395.               begin
  396.               caption3('Stealthed ROMs');
  397.               AX:=$1E01;
  398.               longcall(xlong, regs);
  399.               if not nocarry(regs) then
  400.                 Write('error')
  401.               else
  402.                 Write(BX);
  403.               end;
  404.             end;
  405.           end;
  406.         Writeln;
  407.         end
  408.       else
  409.         Writeln('no')
  410.       end;
  411.     caption2('Quarterdeck''s Manifest (memory resident)');
  412.     if not foundit then
  413.       Writeln('no')
  414.     else
  415.       begin
  416.       AH:=QEMMid;
  417.       AL:=1;
  418.       BX:=$4D41; {'MA'}
  419.       CX:=$4E49; {'NI'}
  420.       DX:=$4645; {'FE'}
  421.       Intr($2F, regs);
  422.       yesorno(BX = $5354 {'ST'});
  423.       end;
  424.     caption2('Quarterdeck''s VIDRAM');
  425.     if not foundit then
  426.       Writeln('no')
  427.     else
  428.       begin
  429.       AH:=QEMMid;
  430.       AL:=1;
  431.       BX:=$5649; {'VI'}
  432.       CX:=$4452; {'DR'}
  433.       DX:=$414D; {'AM'}
  434.       Intr($2F, regs);
  435.       if BX = $4F4B {'OK'} then
  436.         begin
  437.         Write('yes');
  438.         caption3('at code segment');
  439.         Writeln(hex(ES, 4))
  440.         end
  441.       else
  442.         Writeln('no');
  443.       end
  444.     end;
  445.   pause3(-2);
  446.   if endit then
  447.     Exit;
  448.   caption2('386^Max');
  449.   with regs do
  450.     begin
  451.     s:='386MAX$$'#0;
  452.     AX:=$3D00;
  453.     DS:=Seg(s);
  454.     DX:=Ofs(s) + 1;
  455.     MsDos(regs);
  456.     if not nocarry(regs) then
  457.       Writeln('no')
  458.     else
  459.       begin
  460.       xbyte:=AX;
  461.       AX:=$4402;
  462.       BX:=xbyte;
  463.       CX:=$5A;
  464.       DS:=Seg(V386Maxbuf);
  465.       DX:=Ofs(V386Maxbuf);
  466.       V386Maxbuf.version:=3;
  467.       MsDos(regs);
  468.       if not nocarry(regs) then
  469.         Writeln('Maybe; IOCTL call failed')
  470.       else
  471.         with V386maxbuf do
  472.           if signature <> '386MAX' then
  473.             Writeln('No; wrong signature found - "', signature, '"')
  474.           else
  475.             begin
  476.             Write('yes');
  477.             caption3('version');
  478.             Write(verstr[1], decimal, verstr[3], verstr[4]);
  479.             caption3('at segment');
  480.             Writeln(hex(lowseg, 4));
  481.             caption3('EMS active');
  482.             yesorno2(flags1 and $0080 = $0080);
  483.             caption3('Windows 3 support');
  484.             yesorno(flags4 and 1 = 1);
  485.             end;
  486.       AH:=$3E;
  487.       BX:=xbyte;
  488.       MsDos(regs);
  489.       end
  490.     end;
  491.   pause3(-1);
  492.   if endit then
  493.     Exit;
  494.   Caption2('MICEMM');
  495.   if not EMSOK then
  496.     Writeln('no')
  497.   else
  498.     with Regs do
  499.       begin
  500.       AX:=$58F0;
  501.       Intr($67, Regs);
  502.       if AH <> 0 then
  503.         Writeln('no')
  504.       else
  505.         begin
  506.         Write('yes');
  507.         Caption3('Code Segment');
  508.         Writeln(Hex(BX, 4));
  509.         end;
  510.       end;
  511.   pause3(-1);
  512.   if EndIt then
  513.     Exit;
  514.   Caption2('EMM386');
  515.   if not EMSOK then
  516.     Writeln('no')
  517.   else
  518.     with Regs do
  519.       begin
  520.       AX:=$FFA5;
  521.       Intr($67, Regs);
  522.       if AX <> $845A then
  523.         Writeln('no')
  524.       else
  525.         begin
  526.         Write('yes');
  527.         Caption3('API entry');
  528.         SegOfs(BX, CX);
  529.         Caption3('Status');
  530.         xlong:=longint(BX) shl 16 + CX;
  531.         AH:=0;
  532.         LongCall(xlong, Regs);
  533.         if AL and 1 = 1 then
  534.           Write('ON')
  535.         else
  536.           Write('OFF');
  537.         Caption3('Weitek');
  538.         AH:=2;
  539.         AL:=0;
  540.         LongCall(xlong, Regs);
  541.         if AL and 1 = 1 then
  542.           begin
  543.           Write('present ');
  544.           if AL and 2 = 2 then
  545.             Writeln('and enabled')
  546.           else
  547.             Writeln('but disabled')
  548.           end
  549.         else
  550.           Writeln('not present');
  551.         end;
  552.       end;
  553.   pause3(-4);
  554.   if endit then
  555.     Exit;
  556.   caption2('Virtual DMA Spec. (VDS)');
  557.   with regs do
  558.     begin
  559.     AX:=$354B;
  560.     MsDos(regs);
  561.     if (ES = 0) and (BX = 0) then
  562.       Writeln('no')
  563.     else
  564.       begin
  565.       AX:=$8102;
  566.       DX:=0;
  567.       Flags:=FCarry;
  568.       Intr($4B, regs);
  569.       yesorno2(nocarry(regs));
  570.       if nocarry(regs) then
  571.         begin
  572.         caption3('version');
  573.         Write(AH, decimal, hex(AL, 2));
  574.         caption3('product');
  575.         case BX of
  576.           $0000: Write('QMAPS/HPMM');
  577.           $0001: Write('EMM386');
  578.           $0003: Write('Windows 3');
  579.           $4560: Write('386^Max');
  580.           $4D53: Write('Memory Cmdr');
  581.           $5145: Write('QEMM')
  582.         else
  583.           Write(BX);
  584.         end;
  585.         caption3('rev.');
  586.         Writeln(CH, decimal, hex(CL, 2));
  587.         caption3('max. DMA buffer size');
  588.         Write((longint(SI) * 65536 + DI)/1024:0:1, 'K');
  589.         caption3('transfers OK in');
  590.         if DX and 1 = 1 then
  591.           Writeln('First Meg only')
  592.         else
  593.           Writeln('any address');
  594.         caption3('buffer in first meg');
  595.         yesorno2(DX and 2 = 2);
  596.         caption3('auto-remap enabled');
  597.         yesorno2(DX and 4 = 4);
  598.         caption3('contiguous memory');
  599.         yesorno(DX and 8 = 8);
  600.         caption3('BIOS Data bit set');
  601.         yesorno(Mem[$40:$7B] and $20 = $20);
  602.         end
  603.       else
  604.         Writeln;
  605.       end;
  606.     end;
  607.   pause3(-6);
  608.   if endit then
  609.     Exit;
  610.   caption1('----Multi-Taskers and Task Switchers + Utilities---');
  611.   Writeln;
  612.   caption2('Quarterdeck''s Desqview');
  613.   with regs do
  614.     begin
  615.     AX:=$2B01;
  616.     CX:=$4445; {DE}
  617.     DX:=$5351; {SQ}
  618.     MsDos(regs);
  619.     if AL = $FF then
  620.       Writeln('no')
  621.     else
  622.       begin
  623.       Write('yes');
  624.       caption3('version');
  625.       if BX = $0002 then
  626.         Writeln('2', decimal, '00')
  627.       else
  628.         begin
  629.         Write(BH, decimal);
  630.         zeropad(BL);
  631.         Writeln;
  632.         end;
  633.       caption3('window number');
  634.       AX:=$DE07;
  635.       Intr($15, regs);
  636.       Write(AX);
  637.       caption3('true video mode');
  638.       AX:=$DE1E;
  639.       Intr($15, regs);
  640.       Write(BL);
  641.       caption3('width');
  642.       Write(CH);
  643.       caption3('height');
  644.       Writeln(CL);
  645.       caption3('      common memory -> avail');
  646.       AX:=$DE04;
  647.       Intr($15, regs);
  648.       Write(BX:6);
  649.       caption3('largest');
  650.       Write(CX:6);
  651.       caption3('total');
  652.       Writeln(DX:6);
  653.       caption3('conventional memory -> avail');
  654.       AX:=$DE05;
  655.       Intr($15, regs);
  656.       Write(BX:5, 'K');
  657.       caption3('largest');
  658.       Write(CX:5, 'K');
  659.       caption3('total');
  660.       Writeln(DX:5, 'K');
  661.       caption3('    expanded memory -> avail');
  662.       AX:=$DE06;
  663.       Intr($15, regs);
  664.       Write(BX:5, 'K');
  665.       caption3('largest');
  666.       Write(CX:5, 'K');
  667.       caption3('total');
  668.       Writeln(DX:5, 'K');
  669.       end;
  670.     end;
  671.   pause3(-1);
  672.   if endit then
  673.     Exit;
  674.   caption2('DOS 5 task switcher');
  675.   with regs do
  676.     begin
  677.     AX:=$4B02;
  678.     BX:=0;
  679.     ES:=0;
  680.     DI:=0;
  681.     Intr($2F, regs);
  682.     if nocarry(regs) and (AX = 0) and (BX = 0) then
  683.       begin
  684.       Write('yes');
  685.       caption3('switcher entry point');
  686.       segofs(ES, DI);
  687.       Writeln;
  688.       end
  689.     else
  690.       Writeln('no');
  691.     end;
  692.   pause3(-1);
  693.   if endit then
  694.     Exit;
  695.   caption2('DRDOS TaskMAX');
  696.   with regs do
  697.     begin
  698.     AX:=$2700;
  699.     BX:=0;
  700.     CX:=0;
  701.     Intr($2F, regs);
  702.     if AL <> $FF then
  703.       Writeln('no')
  704.     else
  705.       begin
  706.       Write('yes');
  707.       caption3('version');
  708.       AX:=$2701;
  709.       Intr($2F, regs);
  710.       Write(DX);
  711.       caption3('maximum tasks');
  712.       Write(AX);
  713.       caption3('active tasks');
  714.       Writeln(CX)
  715.       end;
  716.     end;
  717.   pause3(-1);
  718.   if endit then
  719.     Exit;
  720.   caption2('TAME');
  721.   with regs do
  722.     begin
  723.     AX:=$2B01;
  724.     CX:=$5441;
  725.     DX:=$4D45;
  726.     MsDos(regs);
  727.     if AL <> 2 then
  728.       Writeln('no')
  729.     else
  730.       begin
  731.       Write('yes');
  732.       caption3('data area');
  733.       Writeln(hex(ES, 4), ':', hex(DX, 4))
  734.       end
  735.     end;
  736.   pause3(-6);
  737.   if endit then
  738.     Exit;
  739.   caption2('Microsoft Windows');
  740.   with regs do
  741.     begin
  742.     AX:=$1600;
  743.     Intr($2F, regs);
  744.     case AL of
  745.     $01,$FF: begin
  746.              Writeln('yes');
  747.              caption3('version');
  748.              Writeln('Windows/386 2.x')
  749.              end;
  750.     $00,$80: begin
  751.              AX:=$4680;
  752.              Intr($2F, regs);
  753.              if AX = 0 then
  754.                begin
  755.                Writeln('yes');
  756.                caption3('mode');
  757.                Writeln('Real or Standard')
  758.                end
  759.              else
  760.                Writeln('no');
  761.              end;
  762.     $02..$7F,$81..$FE: begin
  763.                        Writeln('yes');
  764.                        caption3('version');
  765.                        Write(AL, decimal, AH, ' enhanced mode');
  766.                        caption3('Virtual Machine ID');
  767.                        AX:=$1683;
  768.                        Intr($2F, regs);
  769.                        Writeln(BX);
  770.                        caption3('WINOLDAP support');
  771.                        AX:=$1700;
  772.                        Intr($2F, regs);
  773.                        if AX = $1700 then
  774.                          Writeln('no')
  775.                        else
  776.                          begin
  777.                          Write('yes');
  778.                          caption3('version');
  779.                          Writeln(AL, decimal, AH);
  780.                          end;
  781.                        caption3('Driver version');
  782.                        xword1:=windev(0);
  783.                        Write(Hi(xword1), decimal, Lo(xword1));
  784.                        caption3('Device type');
  785.                        Writeln(winclass[Lo(windev(2))]);
  786.                        caption3('Pixel width');
  787.                        Write(windev(8));
  788.                        caption3('height');
  789.                        Write(windev($A));
  790.                        caption3('colors');
  791.                        Write(windev($18));
  792.                        caption3('bits/pixel');
  793.                        Write(windev($C));
  794.                        caption3('bit planes');
  795.                        Writeln(windev($E));
  796.                        caption3('X aspect');
  797.                        Write(windev($28));
  798.                        caption3('Y aspect');
  799.                        Writeln(windev($2A));
  800.                        caption3('brushes');
  801.                        Write(windev($10));
  802.                        caption3('pens');
  803.                        Write(windev($12));
  804.                        caption3('markers');
  805.                        Write(windev($14));
  806.                        caption3('fonts');
  807.                        Writeln(windev($16));
  808.                        end;
  809.     end; {case}
  810.     end;
  811.   pause3(-1);
  812.   if endit then
  813.     Exit;
  814.   caption1('----Norton Utilities----');
  815.   Writeln;
  816.   caption2('Norton NCACHE');
  817.   with regs do
  818.     begin
  819.     AX:=$FE00;
  820.     BX:=0;
  821.     CX:=0;
  822.     DX:=0;
  823.     DI:=$4E55; {NU}
  824.     SI:=$4346; {CF}
  825.     Intr($2F, regs);
  826.     if SI = $6366 {cf} then
  827.       begin
  828.       Write('yes (NCACHE-F or NCACHE v6+)');
  829.       caption3('status');
  830.       nortonstatus(AH);
  831.       Writeln;
  832.       end
  833.     else
  834.       begin
  835.       AX:=$FE00;
  836.       BX:=0;
  837.       CX:=0;
  838.       DX:=0;
  839.       DI:=$4E55; {NU}
  840.       SI:=$4353; {CS}
  841.       Intr($2F, regs);
  842.       if SI = $6373 {cs} then
  843.         begin
  844.         Write('yes (NCACHE-S)');
  845.         caption3('status');
  846.         nortonstatus(AH);
  847.         Writeln
  848.         end
  849.       else
  850.         Writeln('no');
  851.       end
  852.     end;
  853.   pause3(-1);
  854.   if endit then
  855.     Exit;
  856.   caption2('Norton Diskreet');
  857.   with regs do
  858.     begin
  859.     AX:=$FE00;
  860.     BX:=0;
  861.     CX:=0;
  862.     DX:=0;
  863.     DI:=$4E55; {NU}
  864.     SI:=$4443; {DC}
  865.     Intr($2F, regs);
  866.     if SI = $6463 {dc} then
  867.       begin
  868.       Write('yes');
  869.       caption3('status');
  870.       nortonstatus(AH);
  871.       caption3('resident at');
  872.       Writeln(hex(CX, 4))
  873.       end
  874.     else
  875.       Writeln('no');
  876.     end;
  877.   pause3(-1);
  878.   if endit then
  879.     Exit;
  880.   caption2('Norton DiskMon');
  881.   with regs do
  882.     begin
  883.     AX:=$FE00;
  884.     BX:=0;
  885.     CX:=0;
  886.     DX:=0;
  887.     DI:=$4E55; {NU}
  888.     SI:=$444D; {DM}
  889.     Intr($2F, regs);
  890.     if SI = $646D {dm} then
  891.       begin
  892.       Write('yes');
  893.       caption3('status');
  894.       nortonstatus(AH);
  895.       caption3('resident at');
  896.       Writeln(hex(CX, 4));
  897.       end
  898.     else
  899.       Writeln('no');
  900.     end;
  901.   pause3(-1);
  902.   if endit then
  903.     Exit;
  904.   caption2('Norton FileSave/EraseProtect');
  905.   with regs do
  906.     begin
  907.     AX:=$FE00;
  908.     BX:=0;
  909.     CX:=0;
  910.     DX:=0;
  911.     DI:=$4E55; {NU}
  912.     SI:=$4653; {FS}
  913.     Intr($2F, regs);
  914.     if SI = $6673 {fs} then
  915.       begin
  916.       Write('yes');
  917.       caption3('resident at');
  918.       Writeln(hex(CX, 4));
  919.       end
  920.     else
  921.       Writeln('no');
  922.     end;
  923.   pause3(-1);
  924.   if endit then
  925.     Exit;
  926.   caption1('----Virus protectors---');
  927.   Writeln;
  928.   caption2('F-PROT package -> F-LOCK');
  929.   with regs do
  930.     begin
  931.     AX:=$4653;
  932.     BX:=0;
  933.     CX:=2;
  934.     Intr($2F, regs);
  935.     yesorno2(AX = $FFFF);
  936.     caption3('F-XCHK');
  937.     AX:=$4653;
  938.     BX:=0;
  939.     CX:=3;
  940.     Intr($2F, regs);
  941.     yesorno2(AX = $FFFF);
  942.     caption3('F-POPUP');
  943.     AX:=$4653;
  944.     BX:=0;
  945.     CX:=4;
  946.     Intr($2F, regs);
  947.     yesorno2(AX = $FFFF);
  948.     caption3('F-DLOCK');
  949.     AX:=$4653;
  950.     BX:=0;
  951.     CX:=5;
  952.     Intr($2F, regs);
  953.     yesorno(AX = $FFFF)
  954.     end;
  955.   pause3(-1);
  956.   if endit then
  957.     Exit;
  958.   caption2('TBScanX');
  959.   with regs do
  960.     begin
  961.     AX:=$CA00;
  962.     BX:=$5442; {TB}
  963.     Intr($2F, regs);
  964.     if (AL <> $FF) or (BX <> $7462 {tb}) then
  965.       Writeln('no')
  966.     else
  967.       begin
  968.       Write('yes');
  969.       caption3('version');
  970.       AX:=$CA01;
  971.       Intr($2F, regs);
  972.       if AH <> $CA then
  973.         Write(AH shr 4, decimal, addzero(AH and $F))
  974.       else
  975.         Write('2.2-');
  976.       caption3('status');
  977.       if AL = 0 then
  978.         Writeln('disabled')
  979.       else
  980.         Writeln('enabled');
  981.       end
  982.     end;
  983.   pause3(-1);
  984.   if endit then
  985.     Exit;
  986.   caption2('Flu_Shot+');
  987.   with regs do
  988.     begin
  989.     AX:=$FF0F;
  990.     MsDos(regs);
  991.     yesorno(AX = $0101);
  992.     end;
  993.   pause3(-1);
  994.   if endit then
  995.     Exit;
  996.   caption1('----SCSI drivers----');
  997.   Writeln;
  998.   caption2('Common Access Method SCSI (CAM-SCSI)');
  999.   with regs do
  1000.     begin
  1001.     AX:=$354F;
  1002.     MsDos(regs);
  1003.     if (ES <> 0) and (BX <> 0) then
  1004.       begin
  1005.       AX:=$8200;
  1006.       CX:=$8765;
  1007.       DX:=$CBA9;
  1008.       Intr($4F, regs);
  1009.       if (CX = $9ABC) and (DX=$5678) then
  1010.         begin
  1011.         s:='';
  1012.         for xword1:=DI to DI + 7 do
  1013.           s:=s + Chr(Mem[ES:xword1]);
  1014.         yesorno(s = 'SCSI_CAM');
  1015.         end
  1016.       else
  1017.         Writeln('no');
  1018.       end;
  1019.     end;
  1020.   pause3(-1);
  1021.   if endit then
  1022.     Exit;
  1023.   caption2('CMC International SCSI driver');
  1024.   with regs do
  1025.     begin
  1026.     AX:=$3578;
  1027.     MsDos(regs);
  1028.     s:='';
  1029.     for xword1:=BX + 3 to BX + 6 do
  1030.       s:=s + Chr(Mem[ES:xword1]);
  1031.     yesorno(s = 'SCSI');
  1032.     end;
  1033.   pause3(-4);
  1034.   if endit then
  1035.     Exit;
  1036.   caption1('----Disk Caches----');
  1037.   Writeln;
  1038.   caption2('SMARTDRV');
  1039.   with regs do
  1040.     begin
  1041.     s:='SMARTAAR'#0;
  1042.     AX:=$3D00;
  1043.     DS:=Seg(s);
  1044.     DX:=Ofs(s) + 1;
  1045.     MsDos(regs);
  1046.     if not nocarry(regs) then
  1047.       begin
  1048.       AX:=$4A10;
  1049.       BX:=0;
  1050.       CX:=0;
  1051.       DX:=0;
  1052.       Intr($2F, regs);
  1053.       if AX = $BABE then
  1054.         begin
  1055.         Write('yes');
  1056.         caption3('ver');
  1057.         Write(Hi(BP), decimal, addzero(Lo(BP)));
  1058.         caption3('size now');
  1059.         AX:=$4A10;
  1060.         BX:=4;
  1061.         Intr($2F, regs);
  1062.         Write((longint(CX) * BX) div 1024, 'K');
  1063.         caption3('min size');
  1064.         Write((longint(DX) * CX) div 1024, 'K');
  1065.         caption3('element size');
  1066.         Writeln(CX div 1024, 'K');
  1067.         caption3('cache hits');
  1068.         AX:=$4A10;
  1069.         BX:=0;
  1070.         Intr($2F, regs);
  1071.         Write(longint(DX) shl 16 + BX);
  1072.         caption3('cache misses');
  1073.         Writeln(longint(DI) shl 16 + SI);
  1074.         for xbyte:=0 to $19 do
  1075.           begin
  1076.           pause3(-1);
  1077.           if endit then
  1078.             Exit;
  1079.           AX:=$4A10;
  1080.           BX:=3;
  1081.           BP:=xbyte;
  1082.           DX:=0;
  1083.           Intr($2F, regs);
  1084.           if DL <> $FF then
  1085.             begin
  1086.             caption3('Drive');
  1087.             Write(Chr(xbyte + Ord('A')));
  1088.             caption3('read cache');
  1089.             yesorno2(DL and $80 <> $80);
  1090.             caption3('write cache');
  1091.             yesorno2(DL and $40 <> $40);
  1092.             caption3('double buffered');
  1093.             AX:=$4A10;
  1094.             BX:=5;
  1095.             BP:=xbyte;
  1096.             Intr($2F, regs);
  1097.             yesorno(AX = $BABE);
  1098.             end;
  1099.           end;
  1100.         end
  1101.       else
  1102.         Writeln('no')
  1103.       end
  1104.     else
  1105.       begin
  1106.       xbyte:=AX;
  1107.       AX:=$4400;
  1108.       BX:=xbyte;
  1109.       MsDos(regs);
  1110.       if (not nocarry(regs)) or (DX and $4080 <> $4080) then
  1111.         Writeln('Maybe. IOCTL interface not supported.')
  1112.       else
  1113.         begin
  1114.         AX:=$4402;
  1115.         BX:=xbyte;
  1116.         CX:=SizeOf(smartdrvbuf);
  1117.         DS:=Seg(smartdrvbuf);
  1118.         DX:=Ofs(smartdrvbuf);
  1119.         MsDos(regs);
  1120.         if not nocarry(regs) then
  1121.           Writeln('Maybe. IOCTL read failed.')
  1122.         else
  1123.           begin
  1124.           Write('yes');
  1125.           with smartdrvbuf do
  1126.             begin
  1127.             caption3('ver.');
  1128.             Write(majorversion, decimal, minorversion);
  1129.             caption3('Size');
  1130.             Write(current_size * 16, 'K');
  1131.             caption3('Max');
  1132.             Write(original_size * 16, 'K');
  1133.             caption3('Min');
  1134.             Write(minimum_size * 16, 'K');
  1135.             caption3('enabled');
  1136.             yesorno(cache_enabled = 1);
  1137.             caption3('locked tracks');
  1138.             yesorno2(locked > 0);
  1139.             caption3('write-through');
  1140.             yesorno2(write_through = 1);
  1141.             caption3('write-buffered');
  1142.             yesorno2(write_buffered = 1);
  1143.             caption3('hit rate');
  1144.             Writeln(cache_hitrate, '%');
  1145.             caption3('DMA buffering');
  1146.             case buffering_type of
  1147.               0: Write('off');
  1148.               1: Write('on');
  1149.               2: Write('dynamic')
  1150.             else
  1151.               Write('(unknown)');
  1152.             end; {case}
  1153.             caption3('memory type');
  1154.             case drivertype of
  1155.               1: Write('XMS');
  1156.               2: Write('EMS')
  1157.             else
  1158.               Write('unknown:', drivertype);
  1159.             end;
  1160.             caption3('flush on reboot');
  1161.             yesorno(reboot_flush <> 0);
  1162.             caption3('Tracks total');
  1163.             Write(total_tracks);
  1164.             caption3('used');
  1165.             Write(tracks_used);
  1166.             caption3('locked');
  1167.             Write(locked_tracks);
  1168.             caption3('dirty');
  1169.             Writeln(dirty_tracks);
  1170.             end
  1171.           end
  1172.         end;
  1173.       AH:=$3E;
  1174.       BX:=xbyte;
  1175.       MsDos(regs);
  1176.       end
  1177.     end;
  1178.   pause3(-1);
  1179.   if endit then
  1180.     Exit;
  1181.   caption2('HyperDisk');
  1182.   with regs do
  1183.     begin
  1184.     AX:=$DF00;
  1185.     BX:=$4448; {DH}
  1186.     Intr($2F, regs);
  1187.     yesorno((AL = $FF) and (CX = $5948 {YH}));
  1188.     end;
  1189. pause3(-1);
  1190.   if endit then
  1191.     Exit;
  1192.   xword1:=Seg(stackerbuf);
  1193.   xword2:=Ofs(stackerbuf);
  1194.   caption2('Stacker');
  1195.     asm
  1196.     mov  ax,$CDCD       {signature entry}
  1197.     mov  cx,1
  1198.     mov  dx,0
  1199.     push ds             {need to preserve these}
  1200.     push bp
  1201.     mov  ds,xword1      {pointer to address buffer}
  1202.     mov  bx,xword2
  1203.     int  $25            {DOS absolute read sectors}
  1204.     pop  cx             {remove old flags}
  1205.     pop  bp             {restore important regs}
  1206.     pop  ds
  1207.     mov  xword1,ax      {save return code}
  1208.     end;
  1209.   if (xword1 = $CDCD) and (MemW[stackerbuf.ddseg:stackerbuf.ddofs] = $A55A) then
  1210.     with stackerbuf do
  1211.       begin
  1212.       Write('yes');
  1213.       caption3('version');
  1214.       Writeln((MemW[ddseg:ddofs + 2] / 100.0):2:2);
  1215.       end
  1216.   else
  1217.     Writeln('no');
  1218.   pause3(-1);
  1219.   if endit then
  1220.     Exit;
  1221.   caption1('----Miscellaneous----');
  1222.   Writeln;
  1223.   caption2('pcAnywhere');
  1224.   with regs do
  1225.     begin
  1226.     AH:=$79;
  1227.     Intr($16, regs);
  1228.     if AX < $FFFC then
  1229.       Writeln('no')
  1230.     else
  1231.       begin
  1232.       Write(pcAstatus[AX]);
  1233.       caption3('port');
  1234.       AH:=$7C;
  1235.       Intr($16, regs);
  1236.       Write(AH);
  1237.       caption3('baud rate');
  1238.       Writeln(pcAspd[AL]);
  1239.       end;
  1240.     end;
  1241.   pause3(-5);
  1242.   if endit then
  1243.     Exit;
  1244.   caption2('Disk Spool II');
  1245.   with regs do
  1246.     begin
  1247.     AH:=$A0;
  1248.     Intr($1A, regs);
  1249.     if AH = $B0 then
  1250.       begin
  1251.       Write('yes');
  1252.       caption3('at segment');
  1253.       Writeln(hex(ES, 4));
  1254.       caption3('spooler is');
  1255.       case CH of
  1256.         $00: Writeln('disabled');
  1257.         $41: begin
  1258.              Writeln('enabled');
  1259.              caption3('spooling file');
  1260.              xbyte:=0;
  1261.              repeat
  1262.                xchar:=Chr(Mem[ES:BX]);
  1263.                if xchar <> #0 then
  1264.                  Write(xchar);
  1265.                Inc(xbyte);
  1266.                Inc(BX);
  1267.              until (xchar = #0) or (xbyte >= 64);
  1268.              if xbyte = 0 then
  1269.                Write('(none)');
  1270.              Writeln;
  1271.              end;
  1272.       else
  1273.         Writeln('??')
  1274.       end;
  1275.       caption3('despooler is');
  1276.       case CL of
  1277.         $00: Writeln('disabled');
  1278.         $41: begin
  1279.              Write('enabled and ');
  1280.              case DL of
  1281.                $00: Writeln('actively printing');
  1282.                $41: Writeln('standing by');
  1283.              else
  1284.                Writeln('?????');
  1285.              end;
  1286.              caption3('despooler file');
  1287.              xbyte:=0;
  1288.              repeat
  1289.                xchar:=Chr(Mem[ES:SI]);
  1290.                if xchar <> #0 then
  1291.                  Write(xchar);
  1292.                Inc(xbyte);
  1293.                Inc(SI);
  1294.              until (xchar = #0) or (xbyte >= 64);
  1295.              if xbyte = 0 then
  1296.                Write('(none)');
  1297.              Writeln;
  1298.              end;
  1299.       else
  1300.         Writeln('????');
  1301.       end;
  1302.       end
  1303.     else
  1304.       Writeln('no');
  1305.     end;
  1306.   pause3(-1);
  1307.   if endit then
  1308.     Exit;
  1309.   caption2('Microsoft/LANtastic Network');
  1310.   regs.AH:=0;
  1311.   Intr($2A, regs);
  1312.   yesorno(regs.AH <> 0);
  1313.   pause3(-1);
  1314.   if endit then
  1315.     Exit;
  1316.   caption2('PC/TCP Packet driver');
  1317.   with regs do
  1318.     begin
  1319.     xbyte:=$60;
  1320.     foundit:=false;
  1321.     repeat
  1322.       AH:=$35;
  1323.       AL:=xbyte;
  1324.       MsDos(regs);
  1325.       s:='';
  1326.       for xword1:=BX + 3 to BX + $A do
  1327.         s:=s + Chr(Mem[ES:xword1]);
  1328.       if s = 'PKT DRVR' then
  1329.         foundit:=true;
  1330.       Inc(xbyte);
  1331.     until foundit or (xbyte = $81);
  1332.     if foundit then
  1333.       Writeln('yes, at interrupt $', hex(xbyte - 1, 2))
  1334.     else
  1335.       Writeln('no')
  1336.     end;
  1337.   pause3(-1);
  1338.   if endit then
  1339.     Exit;
  1340.   caption2('Inset');
  1341.   with regs do
  1342.     begin
  1343.     AH:=2;
  1344.     DX:=0;
  1345.     CX:=$07C3; {1987}
  1346.     Intr($17, regs);
  1347.     yesorno(CX = $07C2 {1986})
  1348.     end;
  1349.   pause3(-1);
  1350.   if endit then
  1351.     Exit;
  1352.   caption2('Microsoft CD-ROM extensions');
  1353.   asm
  1354.   mov ax,$DADA
  1355.   push ax
  1356.   mov ax,$1100
  1357.   int $15
  1358.   mov xbyte,al
  1359.   pop ax
  1360.   mov xword1,bx
  1361.   end;
  1362.   if (xbyte <> $FF) or (xbyte2 <> $ADAD) then
  1363.     Writeln('no')
  1364.   else
  1365.     with regs do
  1366.       begin
  1367.       Write('yes');
  1368.       caption3('version');
  1369.       AX:=$150C;
  1370.       Intr($2F, regs);
  1371.       if BX = 0 then
  1372.         Writeln('1.02 or older')
  1373.       else
  1374.         Writeln(BH, decimal, BL);
  1375.       end;
  1376.   pause3(-2);
  1377.   if endit then
  1378.     Exit;
  1379.   caption2('Fossil');
  1380.   xbool1:=false;
  1381.   with regs do
  1382.     begin
  1383.     AH:=$BC;
  1384.     DX:=$1954;
  1385.     Intr($11, regs);
  1386.     if AX = $1954 then
  1387.       xbool1:=true;
  1388.     AX:=$1B00;
  1389.     DX:=$FF;
  1390.     CX:=SizeOf(fossilbuf);
  1391.     ES:=Seg(fossilbuf);
  1392.     DI:=Ofs(fossilbuf);
  1393.     Intr($14, regs);
  1394.     if AX <> $1B00 then
  1395.       begin
  1396.       Write('yes');
  1397.       caption3('type');
  1398.       if xbool1 then
  1399.         Write('BNU')
  1400.       else
  1401.         if (CX = $3058 {0X}) and (DX = $2030 { 0}) then
  1402.           Write('X00')
  1403.         else
  1404.           Write('unknown');
  1405.       with fossilbuf do
  1406.         begin
  1407.         caption3('specification level');
  1408.         Write(spec);
  1409.         caption3('revision level');
  1410.         Writeln(rev);
  1411.         caption3('ID string');
  1412.         while Mem[idstrseg:idstrofs] <> 0 do
  1413.           begin
  1414.           Write(Chr(Mem[idstrseg:idstrofs]));
  1415.           Inc(idstrofs)
  1416.           end;
  1417.         Writeln;
  1418.         end
  1419.       end
  1420.     else
  1421.       Writeln('no');
  1422.     end;
  1423.   pause3(-1);
  1424.   if endit then
  1425.     Exit;
  1426.   caption2('Video Fossil');
  1427.   with regs do
  1428.     begin
  1429.     AX:=$8100;
  1430.     ES:=Seg(vfossilbuf);
  1431.     DI:=Ofs(vfossilbuf);
  1432.     Intr($14, regs);
  1433.     if AX <> $1954 then
  1434.       Writeln('no')
  1435.     else
  1436.       with vfossilbuf do
  1437.         begin
  1438.         Write('yes');
  1439.         caption3('version');
  1440.         Write(ver);
  1441.         caption3('revision');
  1442.         Write(rev);
  1443.         caption3('highest function');
  1444.         Write('$', hex(hifunc, 4));
  1445.         end
  1446.     end;
  1447.   end;
  1448. end.
  1449.